package presentation;

import manager.ServiceManager;

import org.apache.log4j.Priority;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;


public class Launcher {

	public Launcher() {
	}

	@SuppressWarnings({ "resource", "unused" })
	public static void main(String[] args) {
		ApplicationContext context;
		if(args.length>0){
			System.out.println("RTDG SIDE: loading external config file: "+args[0]);
			context = new FileSystemXmlApplicationContext(args[0]);
		}
		else{
			System.out.println("RTDG SIDE: loading default context file");
			context = new ClassPathXmlApplicationContext("componentContext.xml");
			
		} 
		ServiceManager.printLog(Priority.INFO_INT, "------------------------------ RTDG Started -----------------------------------");
		//ServiceManager serviceManager = (ServiceManager) context.getBean("serviceManager");
	}

}
